<script charset="utf-8" src="$!{base}/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="$!{base}/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="$!{base}/kindeditor/plugins/code/prettify.js"></script>
<div class="panel panel-default">
	#if($obj.data.reason)
	<div class="alert alert-danger alert-dismissible" role="alert">
		<button type="button" class="close" data-dismiss="alert">
			<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
		</button>
		<strong>Error!</strong> $!{obj.data.reason}
	</div>
	#end
	<div class="panel-heading">
		<h4>给我留言</h4>
	</div>
	<div class="panel-body">
		<form role="form" method="post" action="$!{base}/note">
			<input type="hidden" class="form-control" id="userId" name="userId" value="$!{S.loginUser.id}">
			<div class="form-group">
				<label for="commont">留言者</label> <input class="form-control" id="noter" name="noter" placeholder="亲,请留下你的称呼!" value="$!{S.loginUser.realNanme}">
			</div>
			<div class="form-group">
				<label for="commont">留言标题</label> <input class="form-control" id="title" name="title" placeholder="你想说什么呢?">
			</div>
			<div class="form-group">
				<label for="commont">留言内容</label>
				<textarea id="content" name="content" class="form-control" rows="7" placeholder="你想说什么就说吧">你想说什么就说吧</textarea>
			</div>
			<button type="submit" class="btn btn-sm btn-primary">提交</button>
		</form>
	</div>
</div>
<script type="text/javascript">
	var editor;
	$(function() {
		KindEditor.ready(function(K) {
			editor = K.create('textarea[name="content"]', {
				uploadJson : '$!{base}/uploadFile'
			});
		});
	});
</script>